<?php

namespace Modules\Goods\Entities;

use Illuminate\Database\Eloquent\Model;

class Sku extends Model
{
    protected $fillable = ['sn', 'specification'];
    protected $hidden = ['created_at', 'updated_at'];

    protected $casts = [
        'goods_id' => 'integer',
        'price' => 'integer',
        'market_price' => 'integer',
        'weight' => 'integer',
        'attrabutes' => 'json',
    ];

    public function goods()
    {
        return $this->belongsTo(Goods::class);
    }
}
